import dispatch._
import dispatch.google.cl.AuthRequest
import dispatch.google.cl.ClientLogin._
import scala.xml.XML

val email = "testscarider@gmail.com"
val password = "t2stsc1r3d2r"
  
val http = new Http
val auth_req = AuthRequest("reader", email, password)
      
val token = http(auth_req authorize)

/*
val res = http(:/("www.google.com") / "reader" / "api" / "0" / "unread-count" <@ token as_str)
val file = new java.io.FileWriter("unreadcount-example.xml")
file.write(res)
file.close()
  		  					      
//println(res \ "entry")

//XML.saveFull("feed-example.xml", res.head, "UTF-8", true, null)    

//(res \ "entry").flatMap { ent => (ent \ "category").map { _ \ "@label"} }
*/		  					   